package com.douqu.game.core.entity;


import com.douqu.game.core.protobuf.SGCommonProto;

/**
 * 资源(金币，钻石。。。。。。等)
 * Created by bean on 2017/7/14.
 */
public class Asset extends GameObject {

    public boolean vip;

    public String icon;


    @Override
    public void check()
    {
        SGCommonProto.E_DATA_TYPE type = SGCommonProto.E_DATA_TYPE.forNumber(id);
        if(type == null)
        {
            System.out.println("Asset dataType null -> " + "  id:" + id + "  name:" + name);
        }
        else
        {
            System.out.println("Asset dataType ok   -> " + type + "  id:" + id + "  name:" + name);
        }
    }
//    @Override
//    public void setVariable(String key, String value)
//    {
//        if("id".equals(key))
//        {
//            id = Integer.parseInt(value);
//
//        }
//        else
//            super.setVariable(key, value);
//    }


    @Override
    public String toString() {
        return "Asset{" +
                "vip=" + vip +
                ", icon='" + icon + '\'' +
                "} " + super.toString();
    }
}
